diff options
| author | Sebastien Castiel <sebastien@castiel.me> | 2023-12-07 11:11:53 -0500 |
|---|---|---|
| committer | Sebastien Castiel <sebastien@castiel.me> | 2023-12-07 11:11:53 -0500 |
| commit | 6611e3a187e5398f686449938b7cf1ddbfcb5392 (patch) | |
| tree | 0fae44f29faf8efa68bcdb113ae1ca003cbd024b /src/app/groups/[groupId]/reimbursement-list.tsx | |
| parent | ec981fd237a50dfc547d8c162b22f4e1a691c9fc (diff) | |
Store amounts as cents
Diffstat (limited to 'src/app/groups/[groupId]/reimbursement-list.tsx')
| -rw-r--r-- | src/app/groups/[groupId]/reimbursement-list.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/app/groups/[groupId]/reimbursement-list.tsx b/src/app/groups/[groupId]/reimbursement-list.tsx index e8400ca..54ee9d7 100644 --- a/src/app/groups/[groupId]/reimbursement-list.tsx +++ b/src/app/groups/[groupId]/reimbursement-list.tsx @@ -16,6 +16,14 @@ export function ReimbursementList({ currency, groupId, }: Props) { + if (reimbursements.length === 0) { + return ( + <p className="px-6 text-sm pb-6"> + It looks like your group doesn’t need any reimbursement 😁 + </p> + ) + } + const getParticipant = (id: string) => participants.find((p) => p.id === id) return ( <div className="text-sm"> @@ -35,7 +43,7 @@ export function ReimbursementList({ </Button> </div> <div> - {currency} {reimbursement.amount.toFixed(2)} + {currency} {(reimbursement.amount / 100).toFixed(2)} </div> </div> ))} |
